export default {
    data() {
        return {
            selectedItem: {},
            isShow: false,
            delayId: ''
        }
    },
    methods: {
        onMouseEnter(idx) {
            clearTimeout(this.delayId)
            this.selectedItem = this.dataMenu[idx]
            this.isShow = true
            // console.log('enter');
        },
        onMouseLeave(idx) {
            this.delayId = setTimeout(() => {
                this.isShow = false
                // console.log('leave');
            }, 10)
        },
        onEnter() {
            clearTimeout(this.delayId)
            this.isShow = true
            // console.log('enter');
        },
        onLeave() {
            this.delayId = setTimeout(() => {
                this.isShow = false
                // console.log('leave');
            }, 10)
        }
    }
}
